package com.xbongbong.sys.domain.entity;

import com.xbongbong.paas.toolbox.util.DateTimeUtil;
import com.xbongbong.paas.toolbox.wrap.Entity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 公司镜像配置
 * @author xingxing.xiao
 * @date 2019/11/25 16:25
 */
@Getter
@Setter
@ToString
public class MirrorCompanyEntity extends Entity {

    private static final long serialVersionUID = -7712802109978051289L;

    /**
     * 主键id
     */
    private Long id;
    /**
     * 公司id
     */
    private String corpid;
    /**
     * 镜像版本id
     */
    private Long versionId;
    /**
     * 是否升级标准版
     */
    private Integer isProfessional;
    /**
     * 创建者id
     */
    private String creatorId;
    /**
     * 创建时间时间戳
     */
    private Long addTime;
    /**
     * 更新时间时间戳
     */
    private Long updateTime;
    /**
     * 删除标记
     */
    private Integer del;

    public MirrorCompanyEntity() {
        Long now = DateTimeUtil.getInt();
        this.del = 0;
        this.addTime = now;
        this.updateTime = now;
    }

    public MirrorCompanyEntity(String corpid, Long versionId, String creatorId) {
        Long now = DateTimeUtil.getInt();
        this.corpid = corpid;
        this.versionId = versionId;
        this.creatorId = creatorId;
        this.addTime = now;
        this.updateTime = now;
        this.del = 0;
        this.isProfessional = 0;
    }
}
